package n11.first;

import java.util.*;

public class F02 {

	public static void main(String[] args) {

		Set<Person> set=new HashSet<Person>();
		set.add(new Person("zhangsan",20));
		Person lisi = new Person("lisi",22);
		boolean b1=set.add(lisi);
		boolean b2=set.add(lisi);
		boolean b3=set.add(new Person("lisi",22));
		System.out.println(b1+", "+b2+", "+b3);
		System.out.println(set);
		Person[]ps=new Person[set.size()];
		set.toArray(ps);
		System.out.println(ps[0]);

	}

}
